<%-- 
    Document   : addprogram
    Created on : Jan 20, 2012, 3:23:58 PM
    Author     : Ketsaraporn
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html:html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" href="css/view.css" type="text/css"/>    
        <title>เพิ่มหลักสูตร</title>
        <script>
            function goEdit() {
                redirect("${pageContext.request.contextPath}/manageFaculty.do?dispatch=doEdit", "")
            }
        </script>
    </head>
    <body>
          <html:form action="/manageFaculty.do?dispatch=doAddProgram" >
            <div class="content">
                <table class="three" cellspacing="0">             
                    <tr>
                        <th colspan="2">
                            <c:if test="${manageFacultyForm.editMode}">
                                แก้ไขหลักสูตร
                            </c:if>
                            <c:if test="${manageFacultyForm.mode == ''}">
                                เพิ่มหลักสูตร
                            </c:if>
                        </th>
                    </tr>
                    <tr>
                        <td width="100">รหัสหลักสูตร :</td>
                        <td width="671">
                            <label>
                                <html:text property="programEntity.proId" size="20"/>
                            </label>  
                            <span style="color: red">*</span>
                        </td>
                    </tr>
                    <tr>
                        <td width="100">ชื่อหลักสูตร :</td>
                        <td width="671">
                            <label>
                                <html:text property="programEntity.proName" size="100"/>
                            </label>    
                            <span style="color: red">*</span>
                        </td>
                    </tr>              
                    <tr>
                        <td width="100"></td>
                        <c:if test="${manageFacultyForm.editMode}">
                            <td width="671"><html:submit property="btnSave" value="แก้ไข" onclick="goEdit();"/> </td>
                        </c:if>
                        <c:if test="${manageFacultyForm.mode == ''}">
                            <td width="671"><html:submit property="btnSave" value="บันทึก"/> </td>
                        </c:if>                  
                    </tr>
                </table>             
            </div>
        </html:form>      
    </body>
</html:html>